package cn.org.dian.easycommunicate.model;

import java.util.HashMap;

/**
 * Map \res\raw\content.xml
 * 
 * @author LiuGen
 *
 */
public class Content {
    /**
     * <themeName, theme>
     */
    private HashMap<String, Theme> allThemes = null;
    
    public Content() {
        this.allThemes = new HashMap<String, Theme>();
    }
    
    public void addTheme(String themeName, Theme theme) {
        this.allThemes.put(themeName, theme);
    }
    
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("-Content:\n");
        for (String themeName : allThemes.keySet()) {
            sb.append(allThemes.get(themeName).toString());
        }
        sb.append("-Content end\n");
        return new String(sb);
    }

    /**
     * @return the allThemes
     */
    public HashMap<String, Theme> getAllThemes() {
        return allThemes;
    }
}



